<%@ page language="java" import="java.util.*,com.zjut.zs.util.tools.*, com.zjut.an.news.manager.*, com.zjut.an.news.dao.*, 
com.zjut.zs.user.manager.*, com.zjut.zs.user.dao.*,com.zjut.zs.userstatus.manager.*, com.zjut.zs.userstatus.dao.*,
com.zjut.zs.review.manager.*, com.zjut.zs.review.dao.*,com.zjut.an.util.tools.*,com.zjut.an.util.system.*,
com.zjut.an.config.manager.*, com.zjut.an.config.dao.*" pageEncoding="utf-8"%>
<!DOCTYPE html>
<html lang="zh-cn">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>无标题文档</title>
<link href="../apply/css/style.css" rel="stylesheet" type="text/css" />
<link href="../apply/css/web.css" rel="stylesheet" type="text/css" />
</head>
<%
ZsReviewManager rmanager = (ZsReviewManager) SpringContextUtil.getBean("ZsReviewManager");
ZsHTMLCreat html = (ZsHTMLCreat) SpringContextUtil.getBean("ZsHTMLCreat");
ZsUserStatusManager zsmanager = (ZsUserStatusManager) SpringContextUtil.getBean("ZsUserStatusManager");
int reId = Integer.parseInt(request.getParameter("reId"));
ZsReview review = rmanager.getData(reId);

 %>
<body>

	<div class="place">
    <span>位置：</span>
    <ul class="placeul">
    <li><a href="#">首页</a></li>
    <li><a href="#">专家评分</a></li>
    </ul>
    </div>
    <div class="formbody">    
	    <div class="rightinfo">		    
			<!--单页面-->  
			<form id="ff" Config="form" class="form-horizontal" action="javascript:submitFormReview();" method="post">  
			<div class="formbody">   
			<ul class="forminfo">
			<li><label>专家评分<b>*</b></label>
			<input id="num" name="num" type="text" class="dfinput" value="<%=html.getInputString(review.getNum()) %>"  />
			
			<i id=""></i></li> 
			<li><label>评分备注<b></b></label>
			<textarea id="remark" class="textinput" rows="3" name="remark"><%=html.getInputString(review.getRemark())%></textarea><i id=""></i></li> 
			<li><label>&nbsp;</label>			
			<input id="reId" name="reId" type="text" class="dfinput" value="<%=review.getReId() %>"  style="display:none;"/>
			<button type="submit" class="btn btn-primary btn-sm">保存 </button>  </li>
			</ul>
			</div>
            </form> 
	    </div> 
	    
    </div>
    
</body>
<script src="../plugins/assets/plugins/jquery-1.10.2.min.js" type="text/javascript"></script>
	<script src="../plugins/assets/plugins/jquery-migrate-1.2.1.min.js" type="text/javascript"></script>    
	<script src="../plugins/assets/plugins/bootstrap/js/bootstrap.min.js" type="text/javascript"></script>
	<script src="../plugins/assets/plugins/bootstrap-hover-dropdown/twitter-bootstrap-hover-dropdown.min.js" type="text/javascript" ></script>
	<script src="../plugins/assets/plugins/jquery-slimscroll/jquery.slimscroll.min.js" type="text/javascript"></script>
	<script src="../plugins/assets/plugins/jquery.blockui.min.js" type="text/javascript"></script>  
	<script src="../plugins/assets/plugins/jquery.cookie.min.js" type="text/javascript"></script>
	<script src="../plugins/assets/plugins/uniform/jquery.uniform.min.js" type="text/javascript" ></script>
	<script src="../plugins/assets/scripts/app.js"></script>  
	
	<script src="js/publicManager.js" type="text/javascript" charset="utf-8"></script>   
	
	<script>
	jQuery(document).ready(function() {       
		   App.init();
		}); 
	var loactionurl='zsReviewEdit.jsp?reId=<%=request.getParameter("reId") %>';
	var updateOneAction = '../zsReviewUpdate.action?randnum='+Math.floor(Math.random()*1000000);
		

	function submitFormReview() {//普通提交
		var jsonString = JSON.stringify(serializeToJSONSimply('#ff'));
		//console.log(jsonString);
		$.ajax({
	    	cache: false,
	    	type: "POST",
	        url:updateOneAction,
	        data:{rowstr:jsonString},// 你的formid
	        async: false,
	        error: function(request) {
	        	alert("保存有误");
	        },
	        success: function(data) {
	        	if(data.flag=="gzerror"){
	        		alert("打分内容超过规定上限！");
	        	} else {
	        		alert("保存成功");		            
		            if ("undefined" != typeof loactionurl) {
		            	window.location = loactionurl;
		            }
	        	}	
	        }
	    });
	}
	
	</script>
</html>